using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SettingsDialog : DialogBase
{
    [SerializeField]
    private Slider musicSlider;


    private void Start()
    {
        if (DataManager.Instance != null)
        {
            musicSlider.onValueChanged.AddListener((value) =>
            {
                DataManager.Instance.musicSetting = value;
                DataManager.Instance.SaveSettings();
            });
        }
    }

    public override void Open()
    {
        base.Open();
        musicSlider.value = DataManager.Instance.musicSetting;
    }
}
